package org.stvd.entities.workflow;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import org.stvd.entities.base.BaseEntity;
import org.stvd.entities.common.LongJsonDeserializer;
import org.stvd.entities.common.LongJsonSerializer;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * @Title WfUser
 * @Destribution 工作流审批用户
 * @author houzx
 * @date 2020年10月27日
 */
@Entity
@Table(name="WF_USER")
public class WfUser extends BaseEntity {

    private static final long serialVersionUID = -4281802937755942451L;
    
    /**
     * 主键
     */
    @Id
    @Column(name="ID",nullable=false)
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id = null;
    
    /**
     * 分组编码
     */
    @Column(name="GROUP_CODE")
    private String groupCode = "";
    
    /**
     * 用户ID
     */
    @Column(name="USER_ID",nullable=false)
    private String userId = "";
    
    /**
     * 用户名称
     */
    @Column(name="USER_NAME")
    @NotEmpty(message = "用户名称不能为空！")
    private String userName = "";
    
    /**
     * 部门ID
     */
    @Column(name="DEP_ID")
    private String depId = "";
    
    /**
     * 部门名称
     */
    @Column(name="DEP_NAME")
    private String depName = "";
    
    /**
     * 状态{T：启用；F：禁用}
     */
    @Column(name="STATUS",nullable=false)
    private String status = "";
    
    /**
     * 创建人ID
     */
    @Column(name="CREATE_UID",nullable=false)
    private String createUid = "";
    
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name="CREATE_TIME",nullable = false)
    private Date createTime = null;
    
    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name="MODIFY_TIME",nullable = false)
    private Date modifyTime = null;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
    
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDepId() {
        return depId;
    }

    public void setDepId(String depId) {
        this.depId = depId;
    }

    public String getDepName() {
        return depName;
    }

    public void setDepName(String depName) {
        this.depName = depName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCreateUid() {
        return createUid;
    }

    public void setCreateUid(String createUid) {
        this.createUid = createUid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
}
